home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / sudoku20402212312006.psc / Super Sudoku Solver / FrmOptions.frm < prev    next >
Text File  |  2005-09-18  |  4KB  |  149 lines

  1. VERSION 5.00
  2. Begin VB.Form FrmOptions 
  3.    Caption         =   "Options"
  4.    ClientHeight    =   3585
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   4680
  8.    LinkTopic       =   "Form1"
  9.    MaxButton       =   0   'False
  10.    MinButton       =   0   'False
  11.    ScaleHeight     =   3585
  12.    ScaleWidth      =   4680
  13.    StartUpPosition =   1  'CenterOwner
  14.    Begin VB.CheckBox chkRightClick 
  15.       Caption         =   "Use right click to show possibilities"
  16.       Height          =   255
  17.       Left            =   480
  18.       TabIndex        =   7
  19.       Top             =   2280
  20.       Width           =   2895
  21.    End
  22.    Begin VB.CommandButton Command1 
  23.       Caption         =   "Create book"
  24.       Height          =   495
  25.       Left            =   3480
  26.       TabIndex        =   6
  27.       Top             =   1800
  28.       Width           =   855
  29.    End
  30.    Begin VB.CheckBox chkAutoCreate 
  31.       Caption         =   "Auto create new puzzles if needed"
  32.       Height          =   255
  33.       Left            =   480
  34.       TabIndex        =   5
  35.       Top             =   1920
  36.       Width           =   2895
  37.    End
  38.    Begin VB.Frame Frame1 
  39.       Caption         =   "Grid size"
  40.       Height          =   975
  41.       Left            =   480
  42.       TabIndex        =   2
  43.       Top             =   360
  44.       Width           =   1455
  45.       Begin VB.OptionButton OptGridSize 
  46.          Caption         =   "4 x 4"
  47.          Height          =   255
  48.          Index           =   1
  49.          Left            =   240
  50.          TabIndex        =   4
  51.          Top             =   600
  52.          Width           =   855
  53.       End
  54.       Begin VB.OptionButton OptGridSize 
  55.          Caption         =   "3 x 3"
  56.          Height          =   255
  57.          Index           =   0
  58.          Left            =   240
  59.          TabIndex        =   3
  60.          Top             =   240
  61.          Width           =   855
  62.       End
  63.    End
  64.    Begin VB.CheckBox chkGeussing 
  65.       Caption         =   "Use guessing while solving"
  66.       Height          =   255
  67.       Left            =   480
  68.       TabIndex        =   1
  69.       Top             =   1560
  70.       Width           =   3735
  71.    End
  72.    Begin VB.CommandButton btnOK 
  73.       Caption         =   "OK"
  74.       Height          =   495
  75.       Left            =   1440
  76.       TabIndex        =   0
  77.       Top             =   2880
  78.       Width           =   1575
  79.    End
  80. End
  81. Attribute VB_Name = "FrmOptions"
  82. Attribute VB_GlobalNameSpace = False
  83. Attribute VB_Creatable = False
  84. Attribute VB_PredeclaredId = True
  85. Attribute VB_Exposed = False
  86. Private Sub btnOK_Click()
  87.     Dim OldSize As Integer
  88.     OldSize = GridSize
  89.     GridSize = 3
  90.     If OptGridSize(1).Value = True Then GridSize = 4
  91.     If OldSize <> GridSize Then Call frmSOLVER.RepaintGrid
  92.     Unload Me
  93. End Sub
  94.  
  95. Private Sub chkAutoCreate_Click()
  96.     Autocreate = chkAutoCreate.Value
  97. End Sub
  98.  
  99. Private Sub chkGeussing_Click()
  100.     UseGuessing = chkGeussing.Value
  101. End Sub
  102.  
  103. Private Sub chkRightClick_Click()
  104.     If chkRightClick = 1 Then
  105.         UseRightClick = True
  106.     Else
  107.         UseRightClick = False
  108.     End If
  109. End Sub
  110.  
  111. Private Sub Command1_Click()
  112.     Dim TXT As String
  113.     TXT = "This option will fill the book until 15 puzzles of every level is reached" & vbCrLf
  114.     TXT = TXT & "it will do that for the active GRIDSIZE" & vbCrLf
  115.     TXT = TXT & "WARNING. This can take a long time (especially by 4x4)" & vbCrLf
  116.     TXT = TXT & "Do you like to continue"
  117.     If MsgBox(TXT, vbYesNo, "Create book") = vbYes Then
  118.         Me.Hide
  119.         DoEvents
  120.         Call AutoCreateBook
  121.         Me.Show
  122.     End If
  123. End Sub
  124.  
  125. Private Sub Form_Load()
  126.     If UseGuessing Then
  127.         chkGeussing.Value = 1
  128.     Else
  129.         chkGeussing.Value = 0
  130.     End If
  131.     If GridSize = 3 Then
  132.         OptGridSize(0).Value = True
  133.         OptGridSize(1).Value = False
  134.     Else
  135.         OptGridSize(0).Value = False
  136.         OptGridSize(1).Value = True
  137.     End If
  138.     If Autocreate Then
  139.         chkAutoCreate.Value = 1
  140.     Else
  141.         chkAutoCreate.Value = 0
  142.     End If
  143.     If UseRightClick = True Then
  144.         chkRightClick = 1
  145.     Else
  146.         chkRightClick = 0
  147.     End If
  148. End Sub
  149.